<html>
<head><meta charset="utf-8"><title>Naming specific-register arguments · project-inline-asm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/index.html">project-inline-asm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Naming.20specific-register.20arguments.html">Naming specific-register arguments</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216253788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Naming%20specific-register%20arguments/near/216253788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Naming.20specific-register.20arguments.html#216253788">(Nov 10 2020 at 18:34)</a>:</h4>
<p>Some feedback from <span class="user-mention" data-user-id="243558">@Steven Fackler</span> on <code>asm!</code> syntax:<br>
<a href="https://github.com/rust-lang/rust/issues/72016#issuecomment-720469790">https://github.com/rust-lang/rust/issues/72016#issuecomment-720469790</a></p>
<blockquote>
<p>One bit of feedback is that it would be nice to be able to still refer to arguments placed in specific registers by their name/position rather than just having to use the register itself. Even though it's equivalent, using the argument's name in the asm can make it a bit more clear what's going on, and in cases like this where an existing bit of code is being ported make the Rust version more closely mirror the C version for ease of review.</p>
</blockquote>



<a name="216253796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Naming%20specific-register%20arguments/near/216253796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Naming.20specific-register.20arguments.html#216253796">(Nov 10 2020 at 18:34)</a>:</h4>
<p>I would like this as well.</p>



<a name="216253881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Naming%20specific-register%20arguments/near/216253881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Naming.20specific-register.20arguments.html#216253881">(Nov 10 2020 at 18:34)</a>:</h4>
<p>IIRC, there wasn't some fundamental semantic reason why <em>not</em> to allow naming specific-register arguments.</p>



<a name="216253891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216763-project-inline-asm/topic/Naming%20specific-register%20arguments/near/216253891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/216763-project-inline-asm/topic/Naming.20specific-register.20arguments.html#216253891">(Nov 10 2020 at 18:35)</a>:</h4>
<p>I believe it was more about catching potential errors.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>